<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="../base/head.jsp" %>
<html>
<head>
    <script type="text/javascript">

        var people = {
            name: "Heacewalker",
            age: 25,
            relationship: {"boss": "BigBoss"}
        }

        function postClick() {
            $.ajax({
                type: "POST",
                url: "<%=basePath%>/param/people.do",
                data: people,
                dataType: "json",
                success: function (result) {
                    //......
                },
                error: function (result) {
                    //......
                }
            });
        }


        function PostData() {
            alert('xxx')
            $.ajax({
                type:"POST",
                url:"<%=basePath%>/param/link",
                data:'',
                success:function(result) {
                    //......
                },
                error:function(result) {
                    //......
                }
            });
        }

    </script>

    <title>Insert title here</title>
</head>
<body>
<h1>message:${message}</h1>

<input type="button" name="fun1" value=" postClick " onclick="postClick()"/>
<br/>

<form onsubmit="return PostData()">
    <input name="address[0].address" value="AKB"/>
    <input name="address[0].code" value="47"/>
    <input name="address[1].address" value="HKT"/>
    <input name="address[1].code" value="48"/>
    <input type="submit" value="提交"/>
</form>

</body>
</html>
